<div class="form-group">
    <label for="tagName" class="col-md-3 control-label">用户名</label>
    <div class="col-md-5">
        <input type="text" class="form-control" name="name" id="tagName" value="{{ $name }}"
               @if(auth()->user()->id !== 1 &&$name!='') readonly @endif autofocus>
    </div>
</div>
<div class="form-group">
    <label for="tagEmail" class="col-md-3 control-label">邮箱</label>
    <div class="col-md-5">
        <input type="text" class="form-control" name="email" id="tagEmail" value="{{ $email }}">
    </div>
</div>

<div class="form-group">
    <label for="tagMobile" class="col-md-3 control-label">手机号码</label>
    <div class="col-md-5">
        <input type="text" class="form-control" name="mobile" id="tagMobile" value="{{ $mobile }}">
    </div>
</div>
<div class="form-group">
    <label for="spare_phone_a" class="col-md-3 control-label">备用号码</label>
    <div class="col-md-5">
        <input type="text" class="form-control" name="spare_phone" id="spare_phone_a" value="{{ $spare_phone }}">
    </div>
</div>


<div class="form-group">
    <label for="tagPassword" class="col-md-3 control-label">密码</label>
    <div class="col-md-5">
        <input type="password" class="form-control" name="password" id="tagPassword" value=""
               placeholder="密码为空，表示不修改密码">
    </div>
</div>

<div class="form-group">
    <label for="tagRepassword" class="col-md-3 control-label">密码确认</label>
    <div class="col-md-5">
        <input type="password" class="form-control" name="repassword" id="tagRepassword" value=""
               placeholder="密码为空，表示不修改密码">
    </div>
</div>

{{--@if(auth()->user()->id != $id)@endif--}}
<div class="form-group" @if((auth()->user()->id==$id&&$role_id ==6)||(auth()->user()->id==$id&&$role_id ==7)||(auth()->user()->id==$id&&$role_id ==8)) style="display:none;" @endif>
    <label for="tag" class="col-md-3 control-label">角色列表</label>
    @if(isset($id)&&$id==1)
        <div class="col-md-4" style="float:left;padding-left:20px;margin-top:8px;"><h2>超级管理员</h2></div>
    @else
        <div class="col-md-6">
            @foreach($rolesAll as $v)
                @if(getRoleName(auth()->user()->id) === "推广员")
                    @if($v['display_name'] === "客服主管")
                        <div class="col-md-4" style="float:left;padding-left:20px;margin-top:8px;">
                            <span class="checkbox-custom checkbox-default">
                                <i class="fa"></i>
                                <input class="form-actions" @if(in_array($v['id'],$roles)) checked
                                       @endif id="inputChekbox{{$v['id']}}" type="Checkbox" value="{{$v['id']}}"
                                       name="roles[]"> <label
                                        for="inputChekbox{{$v['id']}}">{{$v['display_name']}}</label>
                            </span>
                        </div>
                    @endif
                @elseif(getRoleName(auth()->user()->id) === "客服主管")
                    @if($v['display_name'] === "客服")
                        <div class="col-md-4" style="float:left;padding-left:20px;margin-top:8px;">
                            <span class="checkbox-custom checkbox-default">
                                <i class="fa"></i>
                                <input class="form-actions" @if(in_array($v['id'],$roles)) checked
                                       @endif id="inputChekbox{{$v['id']}}" type="Checkbox" value="{{$v['id']}}"
                                       name="roles[]"> <label
                                        for="inputChekbox{{$v['id']}}">{{$v['display_name']}}</label>
                            </span>
                        </div>
                    @endif
                @else
                    @if($v['display_name'] !== "客服" && $v['display_name'] !== "客服主管")
                    <div class="col-md-4" style="float:left;padding-left:20px;margin-top:8px;">
                            <span class="checkbox-custom checkbox-default">
                                <i class="fa"></i>
                                <input class="form-actions" @if(in_array($v['id'],$roles)) checked
                                       @endif id="inputChekbox{{$v['id']}}" type="Checkbox" value="{{$v['id']}}"
                                       name="roles[]"> <label
                                        for="inputChekbox{{$v['id']}}">{{$v['display_name']}}</label>
                            </span>
                    </div>
                    @endif
                @endif
            @endforeach
        </div>
    @endif

</div>
